package com.yytek.nmp.api.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yytek.common.core.annotation.Excel;
import com.yytek.common.core.web.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 升级策略对象 upgrade_strategy
 * 
 * @author yytek-iot
 * @date 2022-09-06
 */
@ApiModel("升级策略对象")
public class UpgradeStrategy extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    @ApiModelProperty("$column.columnComment")
    private Long id;

    /** 升级包id */
    @Excel(name = "升级包id")
    @ApiModelProperty("升级包id")
    private Long upgradeFirmwareId;

    /** 策略名 */
    @Excel(name = "策略名")
    @ApiModelProperty("策略名")
    private String name;

    /** 策略(1-即时执行,2-定时执行) */
    @Excel(name = "策略(1-即时执行,2-定时执行)")
    @ApiModelProperty("策略(1-即时执行,2-定时执行)")
    private Integer strategy;

    /** 执行时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "执行时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("执行时间")
    private Date executeTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setUpgradeFirmwareId(Long upgradeFirmwareId) 
    {
        this.upgradeFirmwareId = upgradeFirmwareId;
    }

    public Long getUpgradeFirmwareId() 
    {
        return upgradeFirmwareId;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setStrategy(Integer strategy) 
    {
        this.strategy = strategy;
    }

    public Integer getStrategy() 
    {
        return strategy;
    }
    public void setExecuteTime(Date executeTime) 
    {
        this.executeTime = executeTime;
    }

    public Date getExecuteTime() 
    {
        return executeTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("upgradeFirmwareId", getUpgradeFirmwareId())
            .append("name", getName())
            .append("strategy", getStrategy())
            .append("executeTime", getExecuteTime())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .toString();
    }
}
